import React from 'react'
import './index.scss'

import store from "../../store/index.js";
// 引入addAction 函数
import { addAction, subAction,incAction,decAction } from "../../store/actionCreators";
// 订阅
store.subscribe(() => {
    console.log(store.getState());
});

export default class Home extends React.Component{
    console = (e) =>{
        console.log(e);


    }

    componentWillMount() {
        store.dispatch(addAction(10));
        console.log( store.getState().counter )
    }

    render() {
        return <>
            <div className="main">
                订单
            </div>
        </>
    }
}
